package com.zfs.test.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.springframework.web.bind.annotation.PostMapping;

import com.zfs.test.pojo.Xinxi;

public interface XinxiMapper {

	@SelectProvider( type=XinxiSql.class,method="showAll")
	public List<Xinxi> showAll(@Param("dname") String dname,@Param("s") int s,@Param("e") int e);
	
	@SelectProvider( type=XinxiSql.class,method="getCount")
	public int getCount(String dname);
	
	@Delete("delete from xinxi where did=#{did}")
	public int delete(String did);

	@Insert("insert into xinxi value(#{did},#{dname},#{ddate},#{dsex},#{dschool},#{dbz})")
	public int insert(Xinxi x);

	@Update("update xinxi set dname=#{dname},ddate=#{ddate},dsex=#{dsex},dschool=#{dschool},dbz=#{dbz} where did=#{did}")
	public int update(Xinxi x);
	
}
